****
** Replication File:
**
** The Relationship between Social Media Use and 
** Beliefs in Conspiracy Theories and Misinformation
**
** 2020 October data
****

set more off

* Set working directory

* Open October 2020 data
use "Clean Data, October 2020.dta"

********************************************************************************

****
** Table A1
****

sum age, detail
sum income, detail
sum female
sum white
sum black
sum hispanic

****
** Table A2
****

sum pid
sum ideo 
sum attend

********************************************************************************

****
** Model estimates for Table A12 and marginal
** effects for panel A of Figure A3 (stored
** in "Marginal Effects, October.csv")
****

reg number socmedia conthink pid ideo interest ///
	edu age income female black hispanic	
est sto mod1

reg number socialmedia socmedia conthink pid ideo ///
	interest edu age income female black hispanic	
est sto mod2

reg number c.socialmedia##c.conthink c.socmedia##c.conthink ///
	pid ideo interest edu age income female black hispanic
est sto mod3	
margins, dydx(socialmedia) at(conthink=(1(.5)5))

* Save model estimates
esttab mod1 mod2 mod3 using "Number Estimates, October.rtf", ///
	label cells(b(star fmt(3)) se(par fmt(3))) legend ///
	stats(r2 N, fmt(3 0 1)) ///
	addnotes(Note: OLS coefficients with standard errors in parentheses)

****
** Model estimates for Table A13
** and marginal effects for panel B of 
** Figure A3 (stored in "Marginal Effects, QAnon October.csv")
****

reg qanonft socmedia conthink pid ideo interest ///
	edu age income female black hispanic
est sto mod4

reg qanonft socialmedia socmedia conthink pid ideo interest ///
	edu age income female black hispanic
est sto mod5

reg qanonft c.socialmedia##c.conthink c.socmedia##c.conthink ///
	pid ideo interest edu age income female black hispanic
est sto mod6	
margins, dydx(socialmedia) at(conthink=(1(.5)5))

* Save model estimates
esttab mod4 mod5 mod6 using "QAnon Estimates, October.rtf", ///
	label cells(b(star fmt(3)) se(par fmt(3))) legend ///
	stats(r2 N, fmt(3 0 1)) ///
	addnotes(Note: OLS coefficients with standard errors in parentheses)

clear	
